#ifndef  _HARDWARE_RTC_H
#define  _HARDWARE_RTC_H

#include "ch32v30x_rtc.h"

typedef struct {
    uint8_t  hours;
    uint8_t  mins;
    uint8_t  sec;
    uint16_t years;
    uint8_t  months;
    uint8_t  days;
    uint8_t  weeks;


} _calendar_time;




void rtc_hardware_init(void);
uint8_t rtc_set_time(uint16_t years,uint8_t months,uint8_t days,uint8_t hours,uint8_t mins,uint8_t sec);
uint8_t rtc_get_time(void);
uint8_t rtc_get_weeks(uint16_t years,uint8_t months,uint8_t days);
void rtc_lvgl_get_time(_calendar_time *lvgl_time);

#endif

